<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>moment.js</title>
    <script src="./moment.js"></script>
</head>
<body>

</body>
<script>
    // moment方法是moment.js插件提供
    var date = moment().format('YYYY-MM-DD , HH:mm:ss a');
    console.log( date );

</script>
</html>